<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0"/>
		<title></title>
		<style type="text/css">
			
		</style>
	</head>
	<body>
		<p></p>
		<p></p>
		<p></p>
		<p></p>
	</body>
	<script type="text/javascript">
		var msg = document.querySelectorAll("p");
		function touchFn(event){
			//看看数组里面有几个元素，就是有几根手指在动
			if(event.touches.length == 1){
				msg[0].innerHTML = "触摸对象(targetTouches:" + event.targetTouches[0] + "changeTouches:" + event.changeTouches[0] + ")";
			//触摸坐标
				msg[1].innerHTML = "触摸坐标(clentX:" + event.touches[0].clientX + "clientY:" + event.touches[0].clientY + ")";
			//触摸ID
				msg[2].innerHTML = "触摸ID:" + event.touches[0].identifier;
			}
		}
		//触摸事件
		window.addEventListener("touchstart",touchFn,false)
	</script>
</html>
